﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FckTemplets.aspx.cs" Inherits="PlugNT.Cms.Web.Admin.Pre_FileManager.FckTemplets" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Fck模板文件更新</title>
<link href="../css/control.css" rel="stylesheet" type="text/css" media="all" />
<script language="javascript">
function SwapColor(obj,flag)
{
    obj.style.backgroundColor=flag?"#ECF5FF":"#F4FBFF";
}
function Submit(sid,action)
{
    var title=document.getElementById("txtTitle"+sid).value;
    var image=document.getElementById("txtImage"+sid).value;
    var description=document.getElementById("txtDescription"+sid).value;
    var html=document.getElementById("txtHtml"+sid).value;
    if(window.confirm("确定要执行吗？"))
    {
        document.location.href="?action="+action+"&title="+title+"&image="+image+"&description="+description+"&html="+html;
    }
}
</script>
</head>
<body>
<div class="frmstatic" style="display:block">
    <span class="frmbar" style="margin:0 12px;"></span><span class="frmbar" style="margin:0 11px;"></span>
    <div class="controls">
        <table cellspacing="0" cellpadding="0" border="0" width="100%">
          <tr>
            <td align"left">
                <table>
                    <tr>
                        <td><img src="../images/maintenance_32x32.gif" width="16" height="16" /></td>
                        <td><label>设置 > Fck模板</label></td>
                    </tr>
                </table>
            </td>
            <td align="right">
                <span>操作 > </span>
                <a href='javascript:window.history.back();'>返回</a>   
            </td>
          </tr>
        </table>
    </div>
    <span class="frmbar" style="margin:0 11px;"></span><span class="frmbar" style="margin:0 12px;"></span>
</div>

<div class="frmstatic" style="display:block">
 <table width="100%" border="0" cellpadding="10" cellspacing="0">
   <tr valign="top">
    <td valign="top">


    <form id="form1" runat="server">
     <table width="100%"  border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#d2e6fa">
       <tr valign="top">
        <td valign="top">
            
     
             
             <table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#ecf5ff">
                <tr align="center" onmouseover="SwapColor(this,true);" onmouseout="SwapColor(this,false);" style="background-color:#F4FBFF;"> 
                  <td align="left" nowrap>
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right">标题：</td>
                            <td><input id="txtTitle0" type="text" style="width:150" /></td>
                            <td align="right">图片：</td>
                            <td><input id="txtImage0" type="text" style="width:300" /></td>
                        </tr>
                        <tr>
                            <td align="right">描述：</td>
                            <td colspan="3"><textarea id="txtDescription0" style="width:90%" rows="3"></textarea></td>
                        </tr>
                        <tr>
                            <td align="right">内容：</td>
                            <td colspan="3"><textarea id="txtHtml0" style="width:90%" rows="8"></textarea></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="3">
                            <input class="bt" type="button"  value=" 添加 " onclick="Submit('0','add');" />
                            <input class="bt" type="button" value=" 还原 " onclick="Submit('0','restore');" /> 
                            </td>
                        </tr>
                    </table>
                  </td>
                </tr>
             <asp:Repeater ID="Repeater_admin" runat="server">
              <ItemTemplate>
                <tr align="center" onmouseover="SwapColor(this,true);" onmouseout="SwapColor(this,false);" style="background-color:#F4FBFF;"> 
                  <td align="left" nowrap>
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right">标题：</td>
                            <td><input id="txtTitle<%#Eval("id") %>" type="text" style="width:150" value="<%#Eval("title") %>" disabled="true" /></td>
                            <td align="right">图片：</td>
                            <td><input id="txtImage<%#Eval("id") %>" type="text" style="width:300" value="<%#Eval("image") %>" /></td>
                        </tr>
                        <tr>
                            <td align="right">描述：</td>
                            <td colspan="3"><textarea id="txtDescription<%#Eval("id") %>" style="width:90%" rows="3"><%#Eval("description")%></textarea></td>
                        </tr>
                        <tr>
                            <td align="right">内容：</td>
                            <td colspan="3"><textarea id="txtHtml<%#Eval("id") %>" style="width:90%" rows="8"><%#Eval("html")%></textarea></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="3">
                            <input class="bt" type="button" value=" 编辑 " onclick="Submit('<%#Eval("id") %>','edit');" />
                            <input class="bt" type="button" value=" 删除 " onclick="if(window.confirm('确定删除 [<%#Eval("title") %>] 吗?')){Submit('<%#Eval("id") %>','delete');}" />
                            </td>
                        </tr>
                    </table>
                  </td>
                </tr>
              </ItemTemplate>
             </asp:Repeater>
             <tr>
                <td align="left" style="background-color:#F4FBFF;">
                    <table width="100%" border="0">
                        <tr>
                            <td width="145" align="right"></td>
                            <td><span style="color:#ff0000; line-height:25px;">编辑器有新模板时需要清除ie缓存才能看到新添加的模板。</span></td>
                        </tr>
                        <tr>
                    </table>
                </td>
             </tr>
             </table>
      
          </td>
          </tr>
        </table>    
    </form>
    
    </td>
  </tr>
 </table>
</div>
</body>
</html>
